<template>
    <!--首页财鑫商苑 教辅资料-->
    <div class="product-contain">
        <div class="product-header">
            <h4>实习速递</h4>
            <p>美国管理会计师的简称，美国财会领域的国际三大黄</p>
            <button @click="goUrl">查看更多</button>
        </div>
        <ul class="product-intro-list">
            <li
                class="live-intro"
                v-for="product in productList"
                :key="product.id"
            >
                <div class="intro-msg">
                    <div class="intro-title">
                        <span>{{ product.sx_name }}</span>
                        <span class="intro-tag">{{product.first_lab_name}}</span>
                    </div>
                    <div class="intro-desc">
                        {{product.sx_desc}}
                    </div>
                    <div class="intro-buy" @click="jumpUrl(product.sx_url)">
                        <span>立即投递</span>
                    </div>
                </div>
            </li>
        </ul>
    </div>
</template>
<script>
export default {
    name: 'productWorkView',
    components: {
        /**/
    },
    data() {
        return {
            account: '',
            productList: []
        };
    },
    watch: {
        /**/
    },
    mounted() {
        /**/
        this.doGetSsF()
    },
    methods: {
        //跳转到最新活动
        goUrl() {
            this.$router.push({
                name: 'practiceDelivery'
            })
        },
        /**/
        doGetSsF() {
            this.$api.ajaxData({
                pathName: 'doGetSsF'
            }).then(data => {
                this.productList = data.obj
            })
        },
        jumpUrl(url) {
            window.open(url)
        }
    }
};
</script>
<style scoped lang="scss">
.product-contain {
    display: flex;
    flex-direction: column;
    flex: 1;
    .product-header {
        padding: 15px 10%;
        background: rgb(118, 193, 172);
        color: #fff;
        border-top-right-radius: 10px;
        border-top-left-radius: 10px;

        h4 {
            line-height: 48px;
            margin-bottom: 10px;
            font-size: 28px;
            font-weight: bold;
            text-align: center;
            white-space: nowrap;
            color: #fff;
        }

        p {
            margin: 0 0 20px 0;
            font-size: 14px;
            text-align: center;
        }

        button {
            display: block;
            width: 120px;
            height: 40px;
            margin: 0 auto;
            border-radius: 20px;
            font-size: 13px;
            color: rgb(118, 193, 172);
            background: #fff;
        }
    }
    .product-intro-list {
        flex: 1;
        display: flex;
        flex-direction: column;
        border: 1px solid rgba(242, 242, 242, 1);
        margin: 0;
        > li {
            flex: 1;
            background: #fff;
            &:not(:last-child) {
                border-bottom: 1px solid #eee;
            }
            .intro-msg {
                position: relative;
                padding: 10px;
                .intro-title {
                    line-height: 20rpx;
                    font-size: 14px;
                    color: #333;
                    .intro-tag {
                        display: inline-block;
                        line-height: 1;
                        padding: 1px 10px;
                        margin-right: 5px;
                        margin-bottom: 5px;
                        border-radius: 5px;
                        font-size: 12px;
                        color: #CCCCCC;
                        border: 1px solid #ccc;
                    }
                }
                .intro-desc{
                    padding: 0;
                    @include ellipsis-line(3);
                }
                .intro-buy {
                    display: none;
                    position: absolute;
                    left: 0;
                    bottom: 0;
                    height: 60px;
                    width: 100%;
                    line-height: 60px;
                    font-size: 16px;
                    color: #fff;
                    background: #ff6a00;
                    text-align: center;
                    cursor: pointer;
                }
            }

            &:hover {
                .intro-buy {
                    display: block;
                    position: absolute;
                    bottom: 0;
                    height: 60px;
                    width: 100%;
                    line-height: 60px;
                    font-size: 16px;
                    color: #fff;
                    background: #ff6a00;
                    text-align: center;
                    cursor: pointer;
                }
            }

            &:not(:first-child) {
                border-left: 1px solid rgba(242, 242, 242, 1);
            }
        }
    }

    .intro-item {
        display: flex;
        padding: 10px 20px;
        line-height: 14px;
        font-size: 12px;
        color: #ccc;

        span {
            padding: 1px 5px;
            margin-right: 5px;
            border-radius: 5px;
            border: 1px solid #ccc;
        }
    }

    .intro-title {
        font-family: '微软雅黑';
        font-weight: 400;
        font-style: normal;
        font-size: 14px;
        text-align: left;
        line-height: 28px;
    }

    .intro-desc {
        font-family: '微软雅黑';
        font-weight: 400;
        font-style: normal;
        font-size: 12px;
        color: #999999;
        text-align: left;
        line-height: 28px;
        padding: 10px 20px 0;
    }
}
</style>
